shader "Volumetric/vol out"

{
    Properties
    {
        _Color ("Main Color", Color) = (1,1,1,1)
        _MainTex ("Base", 2D) = "white" { } 
		//_Dist ("Distane modificator", Range(0,1)) = 0
		_Alpha ("Alpha", Range(0,1)) = 0
		_Scale ("Scale", Range(0,3)) = 1
	}

    Category
    {
        ZWrite On
        //Alphatest Greater 0
		Blend one one
		Tags {"RenderType"="Transparent" "Queue"="Transparent"}
		Cull back

        SubShader
        {
		Lighting Off
		
		Pass
			{
				CGPROGRAM
				#pragma vertex VertexProgram
				#pragma fragment frag
				#define _Dist  0
				#define _Power 80
				
				#pragma fragmentoption ARB_fog_exp2
				#pragma fragmentoption ARB_precision_hint_fastest
				#include "volCG.cginc"
				ENDCG

			}
		Pass
			{
				CGPROGRAM
				#pragma vertex VertexProgram
				#pragma fragment frag
				#define _Dist  0.05
				#define _Power 80
				
				#pragma fragmentoption ARB_fog_exp2
				#pragma fragmentoption ARB_precision_hint_fastest
				#include "volCG.cginc"
				ENDCG

			}
		Pass
			{
				CGPROGRAM
				#pragma vertex VertexProgram
				#pragma fragment frag
				#define _Dist  0.025
				#define _Power 80
				
				#pragma fragmentoption ARB_fog_exp2
				#pragma fragmentoption ARB_precision_hint_fastest
				#include "volCG.cginc"
				ENDCG

			}
		Pass
			{
				CGPROGRAM
				#pragma vertex VertexProgram
				#pragma fragment frag
				#define _Dist  0.075
				#define _Power 80
				
				#pragma fragmentoption ARB_fog_exp2
				#pragma fragmentoption ARB_precision_hint_fastest
				#include "volCG.cginc"
				ENDCG

			}
		Pass
			{
				CGPROGRAM
				#pragma vertex VertexProgram
				#pragma fragment frag
				#define _Dist  0.0125
				#define _Power 80
				
				#pragma fragmentoption ARB_fog_exp2
				#pragma fragmentoption ARB_precision_hint_fastest
				#include "volCG.cginc"
				ENDCG

			}
		Pass
			{
				CGPROGRAM
				#pragma vertex VertexProgram
				#pragma fragment frag
				#define _Dist  0.0375
				#define _Power 80
				
				#pragma fragmentoption ARB_fog_exp2
				#pragma fragmentoption ARB_precision_hint_fastest
				#include "volCG.cginc"
				ENDCG

			}
		Pass
			{
				CGPROGRAM
				#pragma vertex VertexProgram
				#pragma fragment frag
				#define _Dist  0.0625
				#define _Power 80
				
				#pragma fragmentoption ARB_fog_exp2
				#pragma fragmentoption ARB_precision_hint_fastest
				#include "volCG.cginc"
				ENDCG

			}
		Pass
			{
				CGPROGRAM
				#pragma vertex VertexProgram
				#pragma fragment frag
				#define _Dist  0.0865
				#define _Power 80
				
				#pragma fragmentoption ARB_fog_exp2
				#pragma fragmentoption ARB_precision_hint_fastest
				#include "volCG.cginc"
				ENDCG
			}
        } 

        SubShader
        {
        ZWrite Off
        //Alphatest Greater 0
		Blend one one
		Tags {"RenderType"="Transparent" "Queue"="Transparent"}
			Pass
			{
				Cull back
				Lighting Off
				CGPROGRAM
				#pragma vertex VertexProgram3

				#include "volCG.cginc"
				ENDCG
				SetTexture [_MainTex]
				{
					combine primary
				}
			}
			
        } 
    }
}